package com.kanshu.ksgb.fastread.doudou.module.login.adapter;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;
import com.kanshu.ksgb.fastread.doudou.R;
import com.kanshu.ksgb.fastread.doudou.module.login.bean.ConsumeBean;

import java.util.List;

/**
 * Created by wcy on 2017\6\23 0023.
 */

public class ConsumeAdapter extends BaseQuickAdapter<ConsumeBean> {
    public ConsumeAdapter(Context context) {
        super(context);
    }

    public ConsumeAdapter(Context context, List<ConsumeBean> data) {
        super(context, data);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_consume_layout;
    }

    @Override
    protected void convert(BaseViewHolder holder, ConsumeBean item, int position) {
        holder.setText(R.id.chapter_title,   item.chapter_title)
                .setText(R.id.coin_info, "-" + item.coin + "金币")
                .setText(R.id.book_title,   item.book_title  )
                .setText(R.id.date, item.consume_time);
    }
}
